package com.sicaolong.myfunctionproject.consumer;

import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;

public class ConsumerTest {
    public static void main(String[] args) {
        Consumer<Integer> consumer = integer -> System.out.println(integer > 100);
        for (int i = 0; i < 200; i++) {
            consumer.accept(i);
        }
        Function<String, String> function = s -> s + "--scl";
        for (int i = 0; i < 100; i++) {
            String apply = function.apply("" + i);
            System.out.println(apply);
        }

        Supplier<String> supplier = () -> "scl----";
        System.out.println(supplier.get());
    }
}
